package com.example.suntest.group.impl;

import com.example.suntest.entity.Person;
import com.example.suntest.group.GroupingStrategy;
import org.springframework.stereotype.Component;

/**
 * @version 1.0
 * @Package: com.at.mrp.bll.service.group.impl
 * @ClassName: ThirdCategoryGroupingStrategy
 * @Author: sgq
 * @Date: 2024/8/12 8:57
 * @Description: TODD
 */
@Component
public class CityGroupingStrategy implements GroupingStrategy<Person, String> {
    @Override
    public String apply(Person person) {
        String city = person.getCity();
        return city == null ? "" : city;
    }
}
